package booroo.basic;

import booroo.interfaces.J17_ProductService;
import booroo.model.ProductVO;

public class J17_Product implements J17_ProductService{

	private ProductVO[] pdata = new ProductVO[100];
	private int pos = -1;
	@Override
	public boolean addProduct(ProductVO p) {
		pdata[++pos] = p;
		return true;
	}

	@Override
	public String readProduct() {
		String result = "";
		ProductVO pvo;
		for(int i = 0;i <= pos; ++i){
			pvo = pdata[i];
			result += pvo.toString() + "\n";
		}
		return result;
	}
	
}
